package edu.gtcfla.km.security.token;

import java.util.Calendar;

import org.apache.shiro.authc.RememberMeAuthenticationToken;

public class CasUserToken implements RememberMeAuthenticationToken {
	
	private static final long serialVersionUID = -1L;
	
	private Calendar cal = Calendar.getInstance();
	
	
	private String username;
	
    // is the user in a remember me mode ?
    private boolean isRememberMe = false;	
	
	public CasUserToken(String username) {
		this.username = username;
	}


	@Override
	public Object getPrincipal() {
		// TODO Auto-generated method stub
		return username;
	}


	@Override
	public Object getCredentials() {
		// TODO Auto-generated method stub
		return username +"-" + cal.getTimeInMillis();
	}


	@Override
	public boolean isRememberMe() {
		// TODO Auto-generated method stub
		return isRememberMe;
	}


	public void setRememberMe(boolean isRememberMe) {
		this.isRememberMe = isRememberMe;
	}
	
	
	

}
